﻿@model IEnumerable<DLM.Domain.DTO.PartyDTO>
@using Webdiyer.WebControls.Mvc;
@{
    ViewBag.Title = "都来米-近期参加的活动";
    Layout = "~/Views/Shared/_Master.cshtml";
}
<div class="main">
    <div class="main_tab_2">
        <div class="main_tab_2_up">
            <ul>
                <li class="current"><a href="#">搜索结果</a></li>
            </ul>
        </div>
        <div class="main_tab_2_down">
            <div class="box">
                <h3>
                    他/她最近参加的活动都有<a>共
                        @{
                            int count = 0;
                            if (Model != null) { count = Model.Count(); }}
                        @count 条</a></h3>
                <div id="divRecent" class="tr clearfix">
                    <ul class="search_result meet clearfix">
                        @foreach (var item in Model)
                        {
                            <li>
                                <div class="pic">
                                      <a href="@Url.Action("View", "Party", new { id=item.PartyID})">
                                            @if (string.IsNullOrEmpty(item.PhotoUrl))
                                            {
                                                <img width="77px" height="90px" src="@Url.Content("~/Files/Photos/" + item.UserID + "/" + item.PublisherPhoto)" alt="user pic" />
                                            }
                                            else
                                            {
                                                <img width="77px" height="90px" src="@Url.Content("~/Files/Party/" + item.PartyID + "/" + item.PhotoUrl)" alt="user pic" /> 
                                            }</a></div>
                                <div class="info">
                                    <h4>
                                        @item.Subject
                                    </h4>
                                    <p>
                                        @item.PartyDate</p>
                                    <p>
                                        @item.Location</p>
                                </div>
                                <div class="action">
                                </div>
                            </li>
                        }
                    </ul>
                    @Html.Pager(Model as PagedList<DLM.Domain.DTO.PartyDTO>, new PagerOptions
{
    PageIndexParameterName = "pageIndex",
    CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>",
    NumericPagerItemWrapperFormatString = "<a>{0}</a>",
    PrevPageText = "<",
    NextPageText = ">",
    ShowNumericPagerItems = true,
    ShowFirstLast = false,
    ShowPrevNext = true,
    CssClass = "scott",
    MorePageText = "...",
    SeparatorHtml = ""
}
    )
                </div>
            </div>
        </div>
    </div>
</div>
<!--main-end-->
